//
// Created by none98 on 2021/9/12.
//

#ifndef LOGINSERVER_INETADDRESS_H
#define LOGINSERVER_INETADDRESS_H


#include <string>
#include <cstring>

class InetAddress {
    friend class TcpConnection;

public:
    InetAddress() = default;

    InetAddress(int port, char *ptr){
        this->port = port;
        memcpy(&ip,ptr,4);
    }

    ~InetAddress(){
    }


private:
    int port;
    char ip[4];
};


#endif //LOGINSERVER_INETADDRESS_H
